package com.car.loan.project.xr.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import javax.validation.constraints.Min;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableName;


import java.util.Date;

/**
 * 业务详细资料、录入资料对象 xr_loan_detail
 *
 * @author ruoyi
 * @date 2019-11-03
 */
@TableName("xr_loan_detail")
@Data
@Accessors(chain = true)
public class LoanDetail {

    private static final long serialVersionUID = 1L;

    /**
     * TODO 结算日期，结算帐户名，结算开户行，结算账号
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    private Long loanId;

    /**
     * 购置税
     */
    @ApiModelProperty("购置税")
    private Double purchaseTax;

    /**
     * 保险费
     */
    @ApiModelProperty("保险费")
    private Double insurance;

    /**
     * 评估费
     */
    @ApiModelProperty("评估费")
    private Double evaluation;

    /**
     * GPS安装费
     */
    @ApiModelProperty("GPS安装费")
    private Double gps;

    /**
     * 担保服务费
     */
    @ApiModelProperty("担保服务费")
    private Double guarantee;

    /**
     * 履约保证金
     */
    @ApiModelProperty("履约保证金")
    private Double bond;

    /**
     * 其它费用
     */
    @ApiModelProperty("其它费用")
    private Double other;

    /**
     * 收费合计
     */
    @ApiModelProperty("收费合计")
    private Double total;

    /**
     * 付款日期
     */
    @ApiModelProperty("付款日期")
    private String advanceDate;


    @ApiModelProperty(value = "应结金额")
    @Min(0)
    private Double shouldAmount;

    /**
     * 付款金额
     */
    @ApiModelProperty("付款金额")
    private Double advanceAmount;

    @ApiModelProperty("付款备注")
    private String advanceRemark;

    /**
     * 付款账户名
     */
    @ApiModelProperty("付款账户名")
    private String bankAccountName;

    /**
     * 付款开户行
     */
    @ApiModelProperty("付款开户行")
    private String bankName;

    /**
     * 付款账号
     */
    @ApiModelProperty("付款账号")
    private String bankAccountNo;

    /**
     * 结算费率
     */
    @ApiModelProperty("结算费率")
    private Double settleRate;

    /**
     * 折扣率
     */
    @ApiModelProperty("折扣率")
    private Double discountRate;

    /**
     * 超期天数
     */
    @ApiModelProperty("超期天数")
    private Integer salesmanDelayDays;

    /**
     * 结算扣罚金额
     */
    @ApiModelProperty("结算扣罚金额")
    private Double salesmanFinedAmount;

    /**
     * 业务员返利日期
     */
    @ApiModelProperty("业务员返利日期")
    private String salesmanRebateDate;

    /**
     * 业务员返利金额
     */
    @ApiModelProperty("业务员返利金额")
    private Double salesmanRebateAmount;

    @ApiModelProperty("结算备注")
    private String salesmanRemark;

    /**
     * 业务员账户名
     */
    @ApiModelProperty("业务员账户名")
    private String salesmanBankAccountName;

    /**
     * 业务员开户行
     */
    @ApiModelProperty("业务员开户行")
    private String salesmanBankName;

    /**
     * 业务员账号
     */
    @ApiModelProperty("业务员账号")
    private String salesmanBankAccountNo;

    /**
     * 合同齐全日期
     */
    @ApiModelProperty("合同齐全日期")
    private String contractDate;

    /**
     * 资料移交日期
     */
    @ApiModelProperty("资料移交日期")
    private String dataTransferDate;

    /**
     * 合同归档日期
     */
    @ApiModelProperty("合同归档日期")
    private String contractFilingDate;

    /**
     * 放贷日期
     */
    @ApiModelProperty("放贷日期")
    private String lendDate;

    /**
     * 首期还款日期
     */
    @ApiModelProperty("首期还款日期")
    private String firstRepayDate;

    /**
     * 首期还款金额
     */
    @ApiModelProperty("首期还款金额")
    private Double firstRepayAmount;

    @ApiModelProperty(value = "每月利息", required = true)
    @Min(1)
    private BigDecimal monthRepayInterest;

    @ApiModelProperty(value = "每月本金", required = true)
    @Min(1)
    private BigDecimal monthRepayPrincipal;

    @ApiModelProperty(value = "首月利息", required = true)
    @Min(1)
    private BigDecimal firstRepayInterest;

    @ApiModelProperty(value = "首月本金", required = true)
    @Min(1)
    private BigDecimal firstRepayPrincipal;

    @ApiModelProperty(value = "末月利息", required = true)
    @Min(1)
    private BigDecimal lastRepayInterest;

    @ApiModelProperty(value = "末月本金", required = true)
    @Min(1)
    private BigDecimal lastRepayPrincipal;


    @ApiModelProperty("最后还款时间")
    private String lastRepaymentDate;

    /**
     * 还款卡号
     */
    @ApiModelProperty("还款卡号")
    private String repayCardNo;

    /**
     * 扣款卡号
     */
    @ApiModelProperty("扣款卡号")
    private String deductionCardNo;

    /**
     * 档案编号
     */
    @ApiModelProperty("档案编号")
    private String fileNo;

    @ApiModelProperty("业务备注")
    private String remark;

    /**
     * 业务审批备注
     */
    @ApiModelProperty("业务审批备注")
    private String auditRemark;

    /**
     * 加签审批备注
     */
    @ApiModelProperty("加签审批备注")
    private String secondAuditRemark;

    /**
     * 缺件详情
     */
    @ApiModelProperty("缺件详情")
    private String missingRemark;

    /**
     * 合同审批备注
     */
    @ApiModelProperty("合同审批备注")
    private String contractRemark;

    @ApiModelProperty("业务建议")
    private String businessSuggest;

    /**
     * 审批员名称
     */
    @ApiModelProperty("审批员名称")
    private String auditorName;

    /**
     * 审批时间
     */
    @ApiModelProperty("审批时间")
    private LocalDateTime auditTime;

    /**
     * 业务提交时间
     */
    @ApiModelProperty("业务提交时间")
    private LocalDateTime submitTime;


}
